#include <iostream>
using namespace std;

class Point{
public:
    Point(){};
    Point (int x, int y): x(x),y(y) {};
    Point operator+(const Point &a)
    {
        //类内重载，运算符重载函数作为类的成员函数
        // 存在隐含参数　this
        Point ret;
        ret.x = this->x + a.x;
        ret.y = this->y + a.y;
        return ret;
    }
    int x,y;
};

int main() {
    Point a(2,4),b(5,3);
    Point c = a + b;
	cout<< "x :" << c.x << endl;
    cout<<"y :" << c.y << endl;
}